﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint.Administration;

namespace Rtl.SharePoint.Administration
{
    /// <summary>
    /// Stores Virtual Earth web service connection information.
    /// </summary>
    public sealed class VEConnectionInfo : SPPersistedObject
    {
        #region Persisted Fields

        [Persisted]
        private string _serviceUrl = string.Empty;

        [Persisted]
        private string _accountID = string.Empty;

        [Persisted]
        private string _password = string.Empty;

        #endregion

        public VEConnectionInfo() : base() { }
        public VEConnectionInfo(string strName, SPPersistedObject objParent) : base(strName, objParent) { }
        public VEConnectionInfo(string strName, SPPersistedObject objParent, Guid objGuid) : base(strName, objParent, objGuid) { }

        #region Public Properties

        /// <summary>
        /// The location of the the service endpoint.
        /// </summary>
        public string ServiceUrl
        {
            get { return _serviceUrl; }
            set { _serviceUrl = value; }
        }

        /// <summary>
        /// Virtual Earth account id for login.
        /// </summary>
        public string AccountID
        {
            get { return _accountID; }
            set { _accountID = value; }
        }

        /// <summary>
        /// Plain-text password.
        /// </summary>
        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        #endregion
    }
}
